"""
URL configuration for mysite project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import include, path

# from app15 import views as views_day15
from app16 import views as views_day16


# 路由模板
# ################### views_day15 ###################
# urlpatterns = [
#     # path("admin/", admin.site.urls),

#     # path("", views_day15.home),
#     path("index/", views_day15.index),
#     path("tpl/", views_day15.tpl),
#     # api
#     path("api/", views_day15.api),
#     # 请求与响应
#     path("something/", views_day15.something),
#     # 登录界面
#     path("login/", views_day15.login),
#     # 数据库操作
#     path("orm/", views_day15.orm),
#     # 用户信息
#     path("user/info/", views_day15.user_info),
#     # 添加用户
#     # path("user/add/",views_day15.user_add),
#     # path("user/delete/",views_day15.user_del),
# ]


# ################### day16 ###################
urlpatterns = [
    # path("admin/", admin.site.urls),
    path("", views_day16.home),
    path("depart/list/", views_day16.depart_list),
    path("depart/add/", views_day16.depart_add),
    # path("depart/delete/", views_day16.depart_del),
    path("depart/<int:nid>/edit/", views_day16.depart_edit),
    path("user/list/", views_day16.user_list),
    path("user/add/", views_day16.user_add),
    path("user/<int:nid>/edit/", views_day16.user_edit),
    path("user/<int:nid>/delete/", views_day16.user_del),
    path("pretty/list/", views_day16.pretty_list),
    path("pretty/add/", views_day16.pretty_add),
    path("pretty/<int:nid>/edit/", views_day16.pretty_edit),
    path("pretty/<int:nid>/delete/", views_day16.pretty_del),
]
